﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ERP_DeliveryEdit.aspx.cs" Inherits="CRM_Store_ERP_DeliveryEdit" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../css/PageStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../JavaScript/Common.js"></script>
    <title></title>
    <script type="text/javascript">

    </script>
</head>
<body>
    <ext:ResourceManager ID="ResourceManager1" runat="server" AjaxViewStateMode="Enabled" />
    <form id="form1" runat="server">
    <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
        <Content>
            <ext:Panel runat="server" Border="false" Layout="RowLayout">
                <TopBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            
                            <ext:Button ID="extBtn_Exit" runat="server" Text="退出" Icon="Cancel">
                                <Listeners>
                                    <Click Fn="closeCurrTab" />
                                </Listeners>
                            </ext:Button>
                            <ext:ToolbarFill ID="ToolbarFill3" runat="server" />
                            <ext:Button ID="Button3" runat="server" Text="导出Excel" Icon="PageExcel">
                                <DirectEvents>
                                    <Click OnEvent="OnExtBtn_ToExcel_Click" />
                                </DirectEvents>
                            </ext:Button>
                            <ext:Button ID="extBtn_Print" runat="server" Text="打印" Icon="Printer">
                                <%--<DirectEvents>
                                <Click OnEvent="OnBtnPrintClick">
                                </Click>
                            </DirectEvents>--%>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:Panel ID="formPanel" runat="server" Border="false" Padding="10" Height="72" Layout="ColumnLayout">
                        <Items>
                            <ext:Container runat="server" Layout="FormLayout" LabelAlign="Right" ColumnWidth="0.33">
                                <Items>
                                    <ext:TextField runat="server" ID="exttxtf_DeliveryNo" FieldLabel="送货单号" ReadOnly="true" AnchorHorizontal="0.95" />
                                    <ext:ComboBox ID="extcomb_StoreRoomId" runat="server" FieldLabel="申请库房"
                                        AnchorHorizontal="0.95" Editable="false" ValueField="STOREROOM_ID" DisplayField="STOREROOM_NAME"
                                        TabIndex="2">
                                        <Store>
                                            <ext:Store ID="Store_Rome" runat="server">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="STOREROOM_ID">
                                                        <Fields>
                                                            <ext:RecordField Name="STOREROOM_ID" />
                                                            <ext:RecordField Name="STOREROOM_NAME" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                    </ext:ComboBox>
                                    <ext:TextField runat="server" ID="exttxtf_Remark" FieldLabel="备注" MaxLength="400" AnchorHorizontal="0.95" />
                                    <ext:Hidden runat="server" ID="exthidn_SalesId" />
                                </Items>
                            </ext:Container>
                            <ext:Container runat="server" Layout="FormLayout" LabelAlign="Right" ColumnWidth="0.33">
                                <Items>
                                    <ext:TextField runat="server" ID="exttxtf_InUserName" FieldLabel="定制人" ReadOnly="true" AnchorHorizontal="0.95" />
                                    <ext:Hidden runat="server" ID="exthidn_InUser" />
                                    <ext:ComboBox runat="server" ID="extcomb_CustomerId" AllowBlank="false" FieldLabel="客户"
                                        DisplayField="CustomerName" ValueField="CustomerId" TypeAhead="false" LoadingText="Searching..."
                                        TriggerAction="All" ForceSelection="false" SelectOnFocus="true" EmptyText="请输入汉字或拼音简码"
                                        Mode="Remote" ItemSelector="div.search-item" MinChars="1" ListWidth="600" TabIndex="10"
                                        AnchorHorizontal="0.95" PageSize="10">
                                        <Template ID="Template1" runat="server">
                                            <Html>
                                                <table width="100%" style="background-color: #f0f0f0; font-size: small; font-weight: bold">
                                                    <tr>
                                                        <td style="width: 33%;">客户</td>
                                                        <td style="width: 33%;">拼音码</td>
                                                        <td style="width: 33%;">地址</td>
                                                    </tr>
                                                </table>
                                                <tpl for=".">
                                                    <div class="search-item">
                                                        <table width="100%">
                                                            <tr>
                                                                <td style="width:33%; ">{CustomerName}</td>
                                                                <td style="width:33%; ">{Spell}</td>
                                                                <td style="width:33%; ">{Address}</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </tpl>
                                            </Html>
                                        </Template>
                                        <Store>
                                            <ext:Store runat="server" ID="Store_Customer" RemotePaging="true">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="CustomerId">
                                                        <Fields>
                                                            <ext:RecordField Name="CustomerId" />
                                                            <ext:RecordField Name="CustomerName" />
                                                            <ext:RecordField Name="Spell" />
                                                            <ext:RecordField Name="Address" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                    </ext:ComboBox>
                                </Items>
                            </ext:Container>
                            <ext:Container runat="server" Layout="FormLayout" LabelAlign="Right" ColumnWidth="0.33">
                                <Items>
                                    <ext:TextField runat="server" ID="exttxtf_InDate" FieldLabel="定制时间" ReadOnly="true" AnchorHorizontal="0.95" />
                                </Items>
                            </ext:Container>
                        </Items>
                    </ext:Panel>
                    <ext:GridPanel runat="server" ID="gridPanel_listdata" RowHeight="1" BodyStyle="border-width:1 0 0 0;" AutoScroll="true" TrackMouseOver="true" StripeRows="true" ClicksToEdit="1">
                        <ColumnModel>
                            <Columns>
                                <ext:RowNumbererColumn Header="<center>序号</center>" Width="35" />
                                <ext:Column Header="<center>商品名称</center>" Width="180" DataIndex="CusCargoName" />
                                <ext:Column Header="<center>商品代码</center>" Width="120" DataIndex="CargoCode" />
                                <ext:Column Header="<center>规格</center>" Width="80" DataIndex="Spec" />
                                <ext:Column Header="<center>批号</center>" Width="120" DataIndex="BatchNo" />
                                <ext:Column Header="<center>数量</center>" Width="80" DataIndex="Count" />
                                <ext:Column Header="<center>采购价</center>" Width="120" DataIndex="CusSupplyprice" />
                                <ext:Column Header="<center>总计</center>" Width="120" DataIndex="CusTotalPrice" />
                                <ext:Column Header="<center>计量单位</center>" Width="80" DataIndex="Unit" />
                                <ext:Column Header="<center>产地</center>" Width="120" DataIndex="Area" />
                            </Columns>
                        </ColumnModel>
                        <Store>
                            <ext:Store runat="server" ID="Store1">
                                <Reader>
                                    <ext:JsonReader IDProperty="DetailId">
                                        <Fields>
                                            <ext:RecordField Name="DetailId" Type="Int" />
                                            <ext:RecordField Name="DBoundId" Type="Int" />
                                            <ext:RecordField Name="OrderId" Type="Int" />
                                            <ext:RecordField Name="ItemId" Type="Int" />
                                            <ext:RecordField Name="Count" Type="Int" />
                                            <ext:RecordField Name="CusDetailId" Type="Int" />
                                            <ext:RecordField Name="BatchNo" />
                                            <ext:RecordField Name="ProduceDate" Type="Date" />
                                            <ext:RecordField Name="DisinfectionDate" Type="Date" />
                                            <ext:RecordField Name="ExpiryDate" Type="Date" />
                                            <ext:RecordField Name="AsepticDate" Type="Date" />
                                            <ext:RecordField Name="StoreRoomId" Type="Int" />
                                            <ext:RecordField Name="StoreRoomName" />
                                            <ext:RecordField Name="Supplyprice" Type="Float" />
                                            <ext:RecordField Name="TotalPrice" Type="Float" />
                                            <ext:RecordField Name="CargoName" />
                                            <ext:RecordField Name="CargoCode" />
                                            <ext:RecordField Name="Spec" />
                                            <ext:RecordField Name="Area" />
                                            <ext:RecordField Name="ProduceName" />
                                            <ext:RecordField Name="Unit" />
                                            <ext:RecordField Name="Spell" />
                                            <ext:RecordField Name="CusSupplyprice" Type="Float" />
                                            <ext:RecordField Name="CusTotalPrice" Type="Float" />
                                            <ext:RecordField Name="CusCargoName" />
                                            <ext:RecordField Name="CusCargoCode" />
                                            <ext:RecordField Name="CusSpell" />
                                        </Fields>
                                    </ext:JsonReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <SelectionModel>
                            <ext:RowSelectionModel runat="server" SingleSelect="true" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolbar runat="server" ID="PagingToolbar1" PageSize="20" DisplayInfo="true"
                                Height="25" DisplayMsg="显示{0} - {1},共{2}条" EmptyMsg="没有可显示的记录" StateID="Store1" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:Panel>
        </Content>
    </ext:Viewport>
    </form>
</body>
</html>
